{include file="common/header"}
<div class="content-wrapper">
    {include file="chat/nav"/}
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <div class="nav-tabs-custom">
                    {include file="chat/tabs"/}
                    <div class="tab-content">
                        <div class="page-content">
                                <div class="panel panel-default ">
                                    <div class="table-responsive panel-body">
                                        {volist name="list" id="v"}
                                        	{if $v['is_admin'] ==0}
	                                        	{if $v['uid'] == $complaint['uid']}
	                                        		{if $v['content'] != ''}
	                                        			投诉者-{$complaint.tname}--{$complaint.uid}：<p>{$v['content']}</p>
	                                        		{/if}
	                                        		{if $v['img'] != ''}
	                                        			<img src="{$v['img']}" style="width:200px;height:200px"/><br/>
	                                        		{/if}
	                                        	{else /}
	                                        		{if $v['content'] != ''}
	                                        			被投诉者--{$complaint.btname}--{$complaint.fid}：<p>{$v['content']}</p>
	                                        		{/if}
	                                        		{if $v['img'] != ''}
	                                        			<img src="{$v['img']}" style="width:200px;height:200px"/><br/>
	                                        		{/if}
	                                        	{/if}
	                                        {else /}
	                                        	管理员：<p>{$v['content']}</p>
	                                        {/if}
                                        {/volist}
                                    </div>
                                </div>
                                <input type="hidden" id="id" value="{$complaint['id']}"/>
                        		<input type="text" id="content"/>
                        		<button id="huifu">回复</button>
                        		<br/><br/>
                        		<button id="tongguo">申诉通过</button>
                        		<br/><br/>
                        		<button id="butongguo">申诉不通过</button>
                          
                            <script type="text/javascript">
                            	$('#huifu').click(function(){
                            		var content = $('#content').val();
                            		if(content == ''){
                            			message('回复不能为空','','error');
                            		}
                            		$.ajax({
							          url: window.location.href,
							          type: 'post',
							          data:{
							          	id:$('#id').val(),
							          	content:content
							          },
							          dataType: 'json',
			
							          success: function(res) {
							          	message(res.message, res.redirect, res.type);
							          }
                            		})                		
							      })
							      $('#tongguo').click(function(){
     
                            		$.ajax({
							          url: '/admin/chat/compass',
							          type: 'post',
							          data:{
							          	id:$('#id').val(),
							          },
							          dataType: 'json',
							          success: function(res) {
							          	message(res.message, res.redirect, res.type);
							          }
                            		})                		
							      })
							      $('#butongguo').click(function(){
                            		$.ajax({
							          url: '/admin/chat/comnopass',
							          type: 'post',
							          data:{
							          	id:$('#id').val()
							          },
							          dataType: 'json',
							          success: function(res) {
							          	message(res.message, res.redirect, res.type);
							          }
                            		})                		
							      })
							      
                                
                            </script>
                        </div>
                    </div>
                    <!-- /.tab-content -->
                </div>
                <!-- /.nav-tabs-custom -->
            </div>
            <!-- /.col -->
        </div>
    </section>
</div>
{include file='common/ufooter'}
